package com.ruoyi.driver.service.impl;

import java.util.List;

import com.ruoyi.employer.domain.CargoSourceDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.CarownerCardetialsMapper;
import com.ruoyi.driver.domain.CarownerCardetials;
import com.ruoyi.driver.service.ICarownerCardetialsService;

/**
 * 车辆详情Service业务层处理
 * 
 * @author Wevon
 * @date 2024-08-13
 */
@Service
public class CarownerCardetialsServiceImpl implements ICarownerCardetialsService 
{
    @Autowired
    private CarownerCardetialsMapper carownerCardetialsMapper;

    /**
     * 查询车辆详情
     * 
     * @param id 车辆详情主键
     * @return 车辆详情
     */
    @Override
    public CarownerCardetials selectCarownerCardetialsById(Long id)
    {
        return carownerCardetialsMapper.selectCarownerCardetialsById(id);
    }

    /**
     * 查询车辆详情列表
     * 
     * @param carownerCardetials 车辆详情
     * @return 车辆详情
     */
    @Override
    public List<CarownerCardetials> selectCarownerCardetialsList(CarownerCardetials carownerCardetials)
    {
        return carownerCardetialsMapper.selectCarownerCardetialsList(carownerCardetials);
    }

    /**
     * 查询车辆详情列表
     * @param cargoSourceDetails 货源信息
     * @return
     */
    @Override
    public List<CarownerCardetials> selectCarDetailsByCargoSource(CargoSourceDetails cargoSourceDetails) {
        return carownerCardetialsMapper.selectCarDetailsByCargoSource(cargoSourceDetails);
    }



    /*根据车主ID查询车辆详情信息*/

    @Override
    public List<CarownerCardetials> selectCardetialsByCarOwnerID(Long carOwnerId) {
        return carownerCardetialsMapper.selectCardetialsByCarOwnerID(carOwnerId);
    }

    /**
     * 新增车辆详情
     * 
     * @param carownerCardetials 车辆详情
     * @return 结果
     */
    @Override
    public int insertCarownerCardetials(CarownerCardetials carownerCardetials)
    {
        return carownerCardetialsMapper.insertCarownerCardetials(carownerCardetials);
    }

    /**
     * 修改车辆详情
     * 
     * @param carownerCardetials 车辆详情
     * @return 结果
     */
    @Override
    public int updateCarownerCardetials(CarownerCardetials carownerCardetials)
    {
        return carownerCardetialsMapper.updateCarownerCardetials(carownerCardetials);
    }

    /**
     * 批量删除车辆详情
     * 
     * @param ids 需要删除的车辆详情主键
     * @return 结果
     */
    @Override
    public int deleteCarownerCardetialsByIds(Long[] ids)
    {
        return carownerCardetialsMapper.deleteCarownerCardetialsByIds(ids);
    }

    /**
     * 删除车辆详情信息
     * 
     * @param id 车辆详情主键
     * @return 结果
     */
    @Override
    public int deleteCarownerCardetialsById(Long id)
    {
        return carownerCardetialsMapper.deleteCarownerCardetialsById(id);
    }
}
